home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form WMF2BMP
- Caption = "WMF2BMP"
- Height = 6210
- Icon = WMF2BMP.FRX:0000
- Left = 255
- LinkTopic = "Form1"
- ScaleHeight = 368
- ScaleMode = 3 'Pixel
- ScaleWidth = 599
- Top = 885
- Width = 9105
- Begin CommandButton Command6
- Caption = "Revert"
- Height = 315
- Left = 120
- TabIndex = 12
- Top = 1320
- Width = 855
- End
- Begin HScrollBar HScroll1
- Height = 315
- LargeChange = 50
- Left = 120
- Max = 1024
- Min = 32
- SmallChange = 5
- TabIndex = 8
- Top = 3540
- Value = 32
- Width = 855
- End
- Begin CommandButton Command5
- Caption = "Clear"
- Height = 315
- Left = 120
- TabIndex = 7
- Top = 2160
- Width = 855
- End
- Begin CommandButton Command4
- Caption = "Load"
- Height = 315
- Left = 120
- TabIndex = 6
- Top = 480
- Width = 855
- End
- Begin CommandButton Command3
- Caption = "Exit"
- Height = 315
- Left = 120
- TabIndex = 5
- Top = 2580
- Width = 855
- End
- Begin CommandButton Command2
- Caption = "Save"
- Height = 315
- Left = 120
- TabIndex = 4
- Top = 1740
- Width = 855
- End
- Begin CommandButton Command1
- Caption = "Convert"
- Enabled = 0 'False
- Height = 315
- Left = 120
- TabIndex = 3
- Top = 900
- Width = 855
- End
- Begin PictureBox Picture2
- AutoSize = -1 'True
- Height = 2115
- Left = 5040
- ScaleHeight = 139
- ScaleMode = 3 'Pixel
- ScaleWidth = 255
- TabIndex = 2
- Top = 480
- Width = 3855
- End
- Begin PictureBox Picture1
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- Height = 2115
- Left = 1080
- ScaleHeight = 139
- ScaleMode = 3 'Pixel
- ScaleWidth = 239
- TabIndex = 0
- Top = 480
- Width = 3615
- End
- Begin Label Label2
- Height = 255
- Left = 120
- TabIndex = 11
- Top = 4320
- Width = 855
- End
- Begin Label Label4
- Caption = "Scale"
- Height = 255
- Left = 120
- TabIndex = 10
- Top = 3240
- Width = 615
- End
- Begin Label Label3
- Height = 255
- Left = 120
- TabIndex = 9
- Top = 4020
- Width = 855
- End
- Begin Label Label1
- AutoSize = -1 'True
- Caption = "WMF Image"
- Height = 195
- Left = 1080
- TabIndex = 1
- Top = 180
- Width = 1020
- End
- Begin Menu filemen
- Caption = "&File"
- Begin Menu exitmen
- Caption = "E&xit"
- End
- End
- Begin Menu aboutmen
- Caption = "&About"
- Begin Menu proginfomen
- Caption = "&About WMF2BMP"
- End
- Begin Menu ososoftmen
- Caption = "&Other OsoSoft Programs"
- End
- End
- '* Be sure to check the properties of all controls,
- 'since they are not set in code, but are very important.
- 'Especially check the properties of picture controls!
- Dim theratio As Single
- Dim oldwidth As Integer
- Sub command1_click ()
- screen.MousePointer = 11
- label1.Caption = "PCX Image"
- picture1.Visible = 0
- picture2.Left = picture1.Left
- picture2.Top = picture1.Top
- picture2.Visible = -1
- picture2.Picture = picture1.Image
- command2.Enabled = True
- hscroll1.Enabled = 0
- screen.MousePointer = 0
- End Sub
- Sub command2_click ()
- If picture2.Visible = 0 Then Exit Sub
- newfile$ = UCase$(Left$(thefile$, InStr(thefile$, "."))) + "BMP"
- fileroot$ = InputBox("Enter Filename.", "WMF2BMP", newfile$)
- If InStr(fileroot$, ".") = 0 Then
- If Len(fileroot$) < 9 Then wholename$ = fileroot$ + ".BMP"
- Else wholename$ = fileroot$
- End If
- If InStr(wholename$, "\") = 0 Then wholename$ = thepath$ + wholename$
- On Error GoTo badfile
- SavePicture picture2, wholename$
- GoTo getout
- badfile:
- msg$ = "Invalid filename. File not saved."
- MsgBox msg$
- Resume getout
- getout:
- End Sub
- Sub Command3_Click ()
- End Sub
- Sub Command4_Click ()
- getfile.Show 1
- If thefile$ = "" Then Exit Sub
- command2.Enabled = False
- picture2.Visible = False
- picture1.Visible = True
- label1.Caption = "WMF Image"
- picture1.Picture = LoadPicture(thefile$)
- label3.Caption = Str$(picture1.Width) + "W"
- label2.Caption = Str$(picture1.Height) + "H"
- theratio = picture1.Width / picture1.Height
- oldwidth = picture1.Width
- hscroll1.Value = picture1.Width
- command1.Enabled = -1
- End Sub
- Sub Command5_Click ()
- picture1.Picture = LoadPicture("")
- picture2.Picture = LoadPicture("")
- picture1.Visible = -1
- picture2.Visible = -1
- label1.Caption = "WMF"
- End Sub
- Sub Command6_Click ()
- picture1.Visible = -1
- picture1.Picture = LoadPicture("")
- picture1.Picture = LoadPicture(thefile$)
- picture2.Picture = LoadPicture("")
- picture2.Visible = 0
- hscroll1.Enabled = -1
- hscroll1.Value = oldwidth
- label1.Caption = "WMF Image"
- command2.Enabled = 0
- End Sub
- Sub Exitmen_Click ()
- End Sub
- Sub Form_Load ()
- picture2.Visible = 0
- command2.Enabled = False
- End Sub
- Sub Form_Unload (Cancel As Integer)
- Unload orderform
- Unload getfile
- End Sub
- Sub HScroll1_Change ()
- picture1.Width = hscroll1.Value
- picture1.Height = Int(picture1.Width / theratio)
- hcaption = Str$(picture1.Width) + "W"
- vcaption = Str$(picture1.Height) + "H"
- label3.Caption = hcaption
- label2.Caption = vcaption
- End Sub
- Sub ososoftmen_Click ()
- orderform.Show 1
- End Sub
- Sub proginfomen_Click ()
- nl$ = Chr$(13) + Chr$(10)
- msg$ = "WMF2BMP is a Free program from OsoSoft, but is Copyright, 1992, by OsoSoft and George Campbell. All Rights Reserved."
- msg$ = msg$ + " You may use this program freely, but must distribute it only in an unaltered form, complete with WMF2BMP.WRI."
- msg$ = msg$ + " You may not distribute this program as part of any commercially distributed program without written permission."
- msg$ = msg$ + nl$ + nl$ + "OsoSoft"
- msg$ = msg$ + nl$ + "1472 Sixth Street"
- msg$ = msg$ + nl$ + "Los Osos, CA 93402"
- msg$ = msg$ + nl$ + "OsoSoft BBS: (805) 528-3753, 300-2400, 8N1"
- MsgBox msg$
- End Sub
-